<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> 
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
  
<html xmlns="http://www.w3.org/1999/xhtml">  
    <head>  
        <title>Contact Us</title>  
        <style>  
            .form-item { margin: 20px 0; }  
            .form-label { font-weight: bold; }  
            .form-error-field { background-color: #FFC; }  
            .form-error-message { font-weight: bold; color: #900; }  
        </style>  
    </head>  
    <body>  
      
<h1>Register</h1>  

<form:form>
        <spring:hasBindErrors name="user">                            
            <div class="form-global-error-message"><form:errors/></div> 
        </spring:hasBindErrors> 
</form:form>
  
<%-- Give command object a meaningful name instead of using default name, 'command' --%>  
<form:form commandName="user">  

    <div class="form-item">  
        <div class="form-label">Email:</div>  
        <form:input id="mail" path="mail" size="40" cssErrorClass="form-error-field"/>  
        <div class="form-error-message"><form:errors path="mail"/></div>  
    </div>  
    <div class="form-item">  
        <div class="form-label">Password:</div>  
        <form:input id="password" path="password" size="40" cssErrorClass="form-error-field"/>  
        <div class="form-error-message"><form:errors path="password"/></div>  
    </div>  
    <div class="form-item">  
        <div class="form-label">Verify Password:</div>  
        <form:input id="vpassword" path="verifyPassword" rows="12" cols="60" cssErrorClass="form-error-field"/>  
        <div class="form-error-message"><form:errors path="verifyPassword"/></div>  
    </div>  
    <div class="form-item">  
        <input type="submit" value="Register" id="submit"/>  
    </div>  
</form:form>  
  
    </body>  
</html>  